package Day19;

import java.util.HashMap;
import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-10-10
 * Time: 9:11
 * To BE A Better Person-2020-3-2
 */
public class TestDemo2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String a=sc.next();
        String b=sc.next();
        int aindex=0;
        int bindex=0;
        HashMap<String,Integer> map=new HashMap<>();
        int beg=0;
        while(aindex<a.length() && bindex<b.length()){
            if (a.charAt(aindex) == b.charAt(bindex)){
                beg=aindex;
            }
            while(a.charAt(aindex) == b.charAt(bindex)){
                aindex++;
                bindex++;
            }
            map.put(a.substring(beg,aindex),a.substring(beg,aindex).length());

        }
    }
}
